<%--
  Created by IntelliJ IDEA.
  User: 戴金睿
  Date: 2022/11/20
  Time: 16:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>EShopManager</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath }/static/lib/bootstrap/css/bootstrap.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/static/stylesheets/theme.css"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath }/static/lib/font-awesome/css/font-awesome.css"/>
    <script src="${pageContext.request.contextPath }/static/lib/jquery-1.7.2.min.js" type="text/javascript"></script>

    <!-- Demo page code -->

    <style type="text/css">
        #line-chart {
            height: 300px;
            width: 800px;
            margin: 0px auto;
            margin-top: 1em;
        }

        .brand {
            font-family: georgia, serif;
        }

        .brand .first {
            color: #ccc;
            font-style: italic;
        }

        .brand .second {
            color: #fff;
            font-weight: bold;
        }
    </style>


</head>
<body>
<!-- 顶部页面 -->
<c:import url="top.jsp"></c:import>
<!-- 左边页面 -->
<c:import url="left.jsp"></c:import>


<div class="content">
    <div class="header">

        <h1 class="page-title">订单管理</h1>
    </div>

    <ul class="breadcrumb">
        <li><a href="${pageContext.request.contextPath}/OrderManagerController/select">订单管理</a> <span class="divider">/</span></li>
        <li class="active">退货单列表</li>
    </ul>

    <div class="container-fluid">

        <div class="row-fluid">

            <span>共有 <b> <b>${backOrderMap.totalPage}</b> 页记录</span>

            <div class="well">

                <table class="table">
                    <thead>
                    <tr id="theTableTitle">
                        <th>发货单流水号</th>
                        <th>订单号</th>
                        <th>下单时间</th>
                        <th>收货人</th>
                        <th>发货时间</th>
                        <th>退货时间</th>
                        <th>操作人</th>
                        <th>操作</th>
                    </tr>
                    </thead>

                    <tbody>

                    <c:forEach items="${backOrderMap.orders}" var="backOrder">

                        <tr>
                            <td>${backOrder.orderId}</td>
                            <td>${backOrder.orderPrice}</td>
                            <td>
                                <a href="#">${backOrder.userName}</a>
                            </td>
                            <td>
                                    ${backOrder.person}
                            </td>
                            <td>${backOrder.address}</td>
                            <td>
                                time
                            </td>
                            <td>
                                    ${sessionScope.adminUser.adminUserNick}
                            </td>
                            <td>
                                <a href="${pageContext.request.contextPath}/OrderManagerController/reforwdSelectOrder/${backOrder.orderId}" title="编辑"><i
                                        class="icon-pencil"></i></a>
                                <a href="javascript:deleteClick()" title="删除"><i class="icon-remove"></i></a>
                            </td>
                        </tr>

                    </c:forEach>
                    </tbody>

                </table>
            </div>
            <div class="pagination pagination myul">
                <ul>
                    <!-- 控制返回来的page -->
                    <c:set var="page" scope="request">
                    <c:if test="${param.page==null}">
                    1
                    </c:if>
                    <c:if test="${param.page!=null}">
                        ${param.page}
                    </c:if>
                    </c:set>

                    <!-- 保存当前查询状态 -->
                    <c:set var="searchcondition" scope="request">
                        ${pageContext.request.contextPath}/OrderManagerController/reforawOrderReturns/${requestScope.page}
                    </c:set>

                    <div class="pagination pagination myul">
                        <ul>
                            <%--  active  disabled--%>
                            <%--是第一页--%>
                            <c:if test="${requestScope.page == 1}">
                                <li class='disabled'><a href="#">&laquo;首页</a></li>
                                <li class='disabled'><a href="#">上一页</a></li>
                            </c:if>
                            <%--不是第一页--%>
                            <c:if test="${requestScope.page != 1}">
                                <li class=''><a href="${requestScope.searchcondition}&page=1">
                                    首页</a></li>
                                <li class=''><a href="${requestScope.searchcondition}&page=${requestScope.page-1}">
                                    上一页</a></li>
                            </c:if>

                            <!-- 填充页数 -->
                            <c:forEach begin="1" end="${backOrderMap.totalPage}" varStatus="orderIndex">
                                <%--是当前页--%>
                                <c:if test="${requestScope.page == orderIndex.count}">
                                    <li class='active'>
                                        <a href="javascript:">${orderIndex.count}</a>
                                    </li>
                                </c:if>
                                <%--不是当前页--%>
                                <c:if test="${requestScope.page != orderIndex.count}">
                                    <li class=''>
                                        <a href="${requestScope.searchcondition}&page=${orderIndex.count}">${orderIndex.count}</a>
                                    </li>
                                </c:if>
                            </c:forEach>

                            <!-- 最后一页 -->
                            <c:if test="${requestScope.page == backOrderMap.totalPage}">
                                <li class='disabled'>
                                    <a href="#">下一页</a>
                                </li>
                                <li class='disabled'>
                                    <a href="#">尾页&raquo;</a>
                                </li>
                            </c:if>

                            <!-- 不是最后一页 -->
                            <c:if test="${requestScope.page != backOrderMap.totalPage}">
                                <li>
                                    <a href="${requestScope.searchcondition}&page=${requestScope.page+1}">
                                        下一页</a>
                                </li>
                                <li>
                                    <a href="${requestScope.searchcondition}&page=${backOrderMap.totalPage}">
                                        尾页&raquo;</a>
                                </li>
                            </c:if>
                        </ul>
                    </div>


            </div>

            <!-- 底部页面 -->
            <c:import url="footer.jsp"/>
        </div>


    </div>

    <script src="${pageContext.request.contextPath }/static/lib/bootstrap/js/bootstrap.js"></script>

    </div>

</body>
</html>

